﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Data.SqlClient;
namespace guest_management_in_a_hotel
{
    public partial class FrmBaoCaoPhong : Form
    {
        SqlConnection conn;
        SqlDataAdapter da;
        DataSet ds;
        public FrmBaoCaoPhong()
        {
            InitializeComponent();
        }

        private void crystalReportViewer1_Load(object sender, EventArgs e)
        {
           conn = Connect.getConnection();
            conn.Open();
            String str = "select * from TblReserve";
            da = new SqlDataAdapter(str, conn);
            ds = new DataSet();
            da.Fill(ds, "phong");
            BaoCaoPhongSD rpt = new BaoCaoPhongSD();
            rpt.SetDataSource(ds);
            crystalReportViewer1.ReportSource = rpt;
            crystalReportViewer1.Show();
        }
    }
}
